import { createAction } from 'redux-actions'
import { UPDATE_MAIN_COMPANY_TYPE } from './type'
import { CompanyDetailRequest } from 'src/utils/RequestAPI'

/* async */
export const DO_REQUEST_COMPANY_DETAIL_ACTION = createAction(
  UPDATE_MAIN_COMPANY_TYPE,
  (...args) => {
    return new Promise((resolve, reject) => {
      CompanyDetailRequest({
        companyId: 5574,
        openId: 'oGDHy0HPtDBCO7_8wCuP9-GY2ltU'
      }).then(res => {
        resolve(res.entry)
      })
    })
  }
)
